---
page_title: "cloudflare_tunnel Resource - Cloudflare"
subcategory: ""
description: |-
  Tunnel exposes applications running on your local web server on any
  network with an internet connection without manually adding DNS
  records or configuring a firewall or router.
---

# cloudflare_tunnel (Resource)

Tunnel exposes applications running on your local web server on any
network with an internet connection without manually adding DNS
records or configuring a firewall or router.

## Example Usage

```terraform
resource "cloudflare_tunnel" "example" {
  account_id = "f037e56e89293a057740de681ac9abbe"
  name       = "my-tunnel"
  secret     = "AQIDBAUGBwgBAgMEBQYHCAECAwQFBgcIAQIDBAUGBwg="
}
```
<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `account_id` (String) The account identifier to target for the resource. **Modifying this attribute will force creation of a new resource.**
- `name` (String) A user-friendly name chosen when the tunnel is created. **Modifying this attribute will force creation of a new resource.**
- `secret` (String, Sensitive) 32 or more bytes, encoded as a base64 string. The Create Argo Tunnel endpoint sets this as the tunnel's password. Anyone wishing to run the tunnel needs this password. **Modifying this attribute will force creation of a new resource.**

### Optional

- `config_src` (String) Indicates if this is a locally or remotely configured tunnel. If `local`, manage the tunnel using a YAML file on the origin machine. If `cloudflare`, manage the tunnel on the Zero Trust dashboard or using tunnel_config, tunnel_route or tunnel_virtual_network resources. Available values: `local`, `cloudflare`. **Modifying this attribute will force creation of a new resource.**

### Read-Only

- `cname` (String) Usable CNAME for accessing the Tunnel.
- `id` (String) The ID of this resource.
- `tunnel_token` (String, Sensitive) Token used by a connector to authenticate and run the tunnel.

## Import

Import is supported using the following syntax:

```shell
$ terraform import cloudflare_tunnel.example <account_id>/<tunnel_id>
```
